@import "../../styles/themes/default";
@import "../../styles/index";

@alert-prefix: ~'@{prefix}-alert';
.@{alert-prefix} {
  display: flex;
  margin: 0;
  padding: 5px;
  color: #424242;
  border-radius: 2px;
  position: relative;
  &-success {
    background-color: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #279b7e;
    > svg {
      fill: #279b7e;
    }
  }
  &-info {
    background-color: #e6f7ff;
    border: 1px solid #91d5ff;
    color: #1c7098;
    > svg {
      fill: #1c7098;
    }
  }
  &-warning {
    background-color: #fffbe6;
    border: 1px solid #ffe58f;
    color: #dc7931;
    > svg {
      fill: #dc7931;
    }
  }
  &-error {
    background-color: #fff1f0;
    border: 1px solid #ffa39e;
    color: #e43d3d;
    > svg {
      fill: #e43d3d;
    }
  }
  &-icon > svg {
    width: 21px;
    height: 25px;
    vertical-align: middle;

  }
  &-content {
    line-height: 27px;
    padding-left: 6px;
  }
  &-close {
    position: absolute;
    right: 4px;
    top: 4px;
    cursor: pointer;
    svg {
      width: 10px;
      height: 10px;
    }
  }

  &-enter {
    opacity: 0.01;
    transform: scale(0);
  }

  &-enter-active {
    opacity: 1;
    transform: scale(1);
    transition: all 300ms ease-out;
  }

  &-exit {
    opacity: 1;
    transform: translateY(0);
  }

  &-exit-active {
    opacity: 0.01;
    transform: translateY(-40%);
    transition: all 300ms ease-out;
  }
}
